<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<html>
<head>
	<base href="${pageContext.request.contextPath}/">
<title>毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<div class="page_title">客户服务管理 > 服务创建</div>
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>
	<button class="common_button" id="saveTable">保存</button>
</div>
<table class="query_form_table">
	<tr>
		<th>编号</th>
		<td><input disabled name="CstNo"/></td>
		<th>服务类型</th>
		<td>
			<select>
				<option>请选择...</option>
				<option>咨询</option>
				<option>投诉</option>
				<option>建议</option>
			</select><span class="red_star">*</span>
		</td>
	</tr>
	<tr>
		<th>概要</th>
		<td colspan="3"><input size="53" /><span class="red_star">*</span></td>
	</tr>	
	<tr>
		<th>客户</th>
		<td><input name="T20" size="20" /><span name="customer" class="red_star">*</span></td>
		<th>状态</th>
		<td>新创建</td>
	</tr>	
	<tr>
		<th>服务请求</th>
		<td colspan="3"><textarea rows="6" cols="50"></textarea><span class="red_star">*</span></td>
	</tr>
	<tr>
		<th>创建人</th>
		<td><input name="T19" value="刘颖" readonly size="20" /><span class="red_star">*</span></td>
		<th>创建时间</th>
		<td><input id="t1" name="T15" readonly size="20" /><span class="red_star">*</span></td>
	</tr>
	</table>
<br />
<table disabled class="query_form_table" id="table3">
	<tr>
		<th>分配给</th>
		<td>
			<select id="sysUser">
				<option>请选择...</option>
			</select> <span class="red_star">*</span></td>
		<th>分配时间</th>
		<td><input id="t2" name="T18" readonly size="20" /><span class="red_star">*</span></td>
	</tr>
</table>
<br />	
<table disabled class="query_form_table" id="table1">
	<tr>
		<th>服务处理</th>
		<td colspan="3"><textarea rows="6" cols="50"></textarea><span class="red_star">*</span></td>
	</tr>
	<tr>
		<th>处理人</th>
		<td><input name="T17" value="刘颖" readonly size="20" /><span class="red_star">*</span></td>
		<th>处理时间</th>
		<td><input id="t3" name="T16" readonly size="20" /><span class="red_star">*</span></td>
	</tr>
</table>
<br />
<table disabled class="query_form_table" id="table2">
	<tr>
		<th>处理结果</th>
		<td><input name="T10" size="20" /><span class="red_star">*</span></td>
		<th>满意度</th>
		<td>
			<select name="D1">
				<option>请选择...</option>
				<option>☆☆☆☆☆</option>
				<option>☆☆☆☆</option>
				<option>☆☆☆</option>
				<option>☆☆</option>
				<option>☆</option>
			</select><span class="red_star">*</span></td>
	</tr>
</table>
<script src="script/common.js"></script>
<script src="js/jquery-2.1.1.js"></script>
<script>
    setCurTime('t1');
	setCurTime('t2');
	setCurTime('t3');
	$(function () {
	    $.post("CusService/setCstNo",function (json) {
			$("input[name='CstNo']").val(json);
        },"json");
		$.post("CusService/selectAllUser",function (json) {
            console.log(json);
			var select=$("#sysUser");
            $.each(json,function (index,values) {
                var option=$("<option></option>");
                option.attr("value",values.usrId);
                option.text(values.usrName);
                select.append(option);
            });
        },"json");

		$("input[name='T20']").change(function () {
		    console.log(1111111);
			/*$.post("CusService/selectCustomer?customeInfo="+$("input[name='T20']").val(),function (json) {
                console.log(json);
				if (json!=null){
					$("span[name='customer']").text(json);
				}else {
                    $("span[name='customer']").text("没有此用户");
				}
            })*/
			$.ajax({
                    url: "CusService/selectCustomer",
                    data:{"customeInfo":$("input[name='T20']").val()},
                    dataType:"json",
                	contentType:"application/json;charset=utf-8",

                	success:function (json) {
						console.log("s:"+json);
                    },
					error:function (json) {
						console.log("e:"+json);
                    }
			});
        });
    });
</script>
</body>
</html>